package com.bolt.auth.admin.api.email.entity;

import com.bolt.support.spring.jpa.entity.BaseNativeAuditingEntity;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;

/**
 * Auto Generate Javadoc
 *
 * @author 日期:2020-10-12 11:34:11
 *         邮箱配置
 **/
@Access(AccessType.FIELD)
@Entity
@Table(name = "sys_email_config")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
public class EmailConfigEntity extends BaseNativeAuditingEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 收件人
     */
    @Column(name = "from_user", length = 255)
    private String fromUser;

    /**
     * 邮件服务器SMTP地址
     */
    @Column(name = "host", length = 255)
    private String host;

    /**
     * 密码
     */
    @Column(name = "pass", length = 255)
    private String pass;

    /**
     * 端口
     */
    @Column(name = "port", length = 255)
    private String port;

    /**
     * 发件者用户名
     */
    @Column(name = "email_user", length = 255)
    private String emailUser;

    /**
     * 是否全局配置
     */
    @Column(name = "global", length = 125)
    private Boolean global;


}